﻿using System.ServiceModel;

namespace MapReduceLib
{
    public class WCFUtils
    {
        public static NetTcpBinding GetDefaultBinding()
        {
            NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
            binding.MaxReceivedMessageSize = 100000;
            binding.ReaderQuotas.MaxArrayLength = 2147483647;
            binding.ReaderQuotas.MaxBytesPerRead = 2147483647;
            binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None;
            binding.Security.Message.ClientCredentialType = MessageCredentialType.None;

            return binding;
        }
    }
}
